import { Config } from "../src/config/Config"
import DateUtil from "../src/engine/utils/DateUtil"
import { Logger } from "../src/engine/utils/Logger"
import RandomUtil from "../src/engine/utils/RandomUtil"
import { ServerManager } from "../src/server/ServerManager"

export class LogTest {

    public date: Date = new Date(2025, 9, 2, 9)
    private needTime: number = RandomUtil.nextInt(1000 * 60 * 25, 1000 * 60 * 60)
    private startTime: number = 0
    private leaveTime: number = 0


    public static instance: LogTest = new LogTest()

    public join() {
        this.startTime = DateUtil.now();
    }

    public leave() {
        this.leaveTime = DateUtil.now() + Config.OneDay * 30
    }


    public checkJoinServer(now: number) {
        // let passTime: number = now - this.startTime;
        // if (now >= this.date.getTime() && passTime >= this.needTime) {
        //     if(now >= this.leaveTime){
        //         ServerManager.instance.joinServer()
        //     }
        // }
    }

}